package com.aidex.biz.service;

import com.aidex.biz.domain.Customer;
import com.aidex.biz.domain.vo.CustomerVo;
import com.aidex.common.core.domain.entity.SysUser;
import com.aidex.common.core.service.BaseService;

import java.util.List;
import java.util.Map;

/**
 * 左心房客户推送信息Service接口
 *
 * @author sean
 * @email 2074844820@qq.com
 * @date 2023-04-03
 */
public interface CustomerService extends BaseService<Customer> {

    /**
     * 批量删除左心房客户推送信息
     *
     * @param ids 需要删除的左心房客户推送信息ID集合
     * @return 结果
     */
    public int deleteCustomerByIds(String[] ids);

    /**
     * 获取最大编号
     *
     * @param customer 左心房客户推送信息
     * @return 结果
     */
    public int findMaxSort(Customer customer);

    /**
     * 根据手机查询客户信息
     *
     * @param phone
     * @return
     */
    public boolean findCustomerByphone(String phone,String type);

    /**
     * 保存推送的客户信息
     *
     * @param customerVo
     * @return
     */
    public Map savePushCustomer(CustomerVo customerVo);

    /**
     * 自动分配分配客户到用户
     *
     * @param customer
     */
    public void shareCustomer(Customer customer);

    /**
     * 手动分配分配客户到用户
     *
     * @param customer
     */
    public int shareCustomer(Customer customer,SysUser sysUser);

    /**
     * 找到下个分配用户
     *
     * @param customer
     * @return
     */
    public SysUser findNextShareUser(Customer customer);

    /**
     * 分配
     *
     * @return
     */
    public void shareCustomerToSysUser(Customer customer);

    /**
     * @return 查询一个为分配的用户
     */
    public Customer findOne();

    /**
     * 导入客户信息
     * @param customers
     * @return
     */
    public String importData(List<Customer> customers);

}
